<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/css/main.css}">
</head>
<body>
        <h2>这个应该行</h2>
        <button type="button" onclick="order()">我的订单</button>
    <form>
        <table class="table  table-bordered">
            <thead>
            <tr >
                <th width="30">#</th>
                <th width="30"><input type="checkbox"></th>
                <th>商品名称</th>
                <th>商品价格</th>
                <th>上架时间</th>
                <th width="100">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="g:${pageInfo.list}">
                <td th:text="g.gid">1</td>
                <td><input type="checkbox" name="gid" th:value="${g.gid}" th:id="|id_${g.gid}|" ></td>
                <td th:text="${g.gname}">Lorem</td>
                <td th:text="${g.price}">ipsum</td>
                <td th:text="${#dates.format(g.createdate,'yyyy-MM-dd')}">dolor</td>
                <td>

                    <button type="button" onclick="addOrder()" class="btn btn-primary btn-xs"><i class=" glyphicon glyphicon-pencil">下单</i></button>
                    <button type="button" class="btn btn-danger btn-xs"><i class=" glyphicon glyphicon-remove"></i></button>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr >
                <td colspan="8" align="center">
                    <ul class="pagination">
                       <li><a th:href="@{/user/list(now=${pageInfo.prePage},gname=#{gname},typeid=#{typeid})}">上一页</a></li>
                        <li><a th:each="page:${pageInfo.getNavigatepageNums()}" th:text="${page}" th:href="@{/user/list(now=${page},gname=#{gname},typeid=#{typeid})}"></a></li>
                        <li><a th:href="@{/user/list(now=${pageInfo.nextPage},gname=#{gname},typeid=#{typeid})}">下一页</a></li>
                    </ul>
                </td>
            </tr>

            </tfoot>
        </table>
    </form>

        <script th:src="@{/jquery/jquery-2.1.1.min.js}"></script>
        <script th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
        <script th:src="@{/script/docs.min.js}"></script>
<script type="text/javascript" th:inline="javascript">
        function addOrder() {
            var url=/*[[@{/user/addOrder}]]*/;
            var userid=/*[[${userid}]]*/
            location.href=url;
        }
        function order() {
            var url=/*[[@{/user/orderList}]]*/
            location.href=url;
        }
</script>
</body>
</html>